package com.itestor.iptv.modules.common.domain;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.itestor.iptv.modules.ne.domain.RobotManage;

/**
 * 表对象：区局.
 * @author Mr.li
 */
@Entity
@Table(name = "REGIONMANAGE")
public class RegionManage {
    
    private Integer idRegion;
    
    private String regionName;
    
    private Integer prentRegionId;
    
    private List<RobotManage> robotManageList;
    
    @Id 
    @GeneratedValue
    @Column(name = "IDREGION") 
    public Integer getIdRegion() {
        return idRegion;
    }

    public void setIdRegion(Integer pIdRegion) {
        idRegion = pIdRegion;
    }

    @Column(name = "REGIONNAME", nullable = false, unique = true)
    public String getRegionName() {
        return regionName;
    }

    public void setRegionName(String pRegionName) {
        regionName = pRegionName;
    }
    
    @Column(name = "PARENTREGIONID")
    public Integer getPrentRegionId() {
        return prentRegionId;
    }

    public void setPrentRegionId(Integer pPrentRegionId) {
        prentRegionId = pPrentRegionId;
    }
    
    @OneToMany(targetEntity=RobotManage.class,cascade=CascadeType.ALL,mappedBy="idRobot")
    public List<RobotManage> getRobotManageList() {
        return robotManageList;
    }

    public void setRobotManageList(List<RobotManage> pRobotManageList) {
        robotManageList = pRobotManageList;
    }   
    
    
    
}
